package Model
{
	
    [Bindable] 
	public class Topic
	{
		protected var _TopicID:Number;
		public  var _TopicName:String; // public - dropdownlist
		protected var _TopicAuthor:User;
		protected var _unreadPosts:Number;
		public var _lastPostDate:Date;
		protected var _TopicPosts:Array
		
			
		public function Topic(TopicID:Number, TopicAuthor:User, lastPostDate:Date, TopicPosts:Array, TopicName:String = "", unreadPosts:Number=0)
		{
			this._TopicID = TopicID;
			this._TopicAuthor = TopicAuthor;
			this._TopicName = TopicName;
			this._unreadPosts = unreadPosts;
			this._lastPostDate = lastPostDate;
			this._TopicPosts = TopicPosts;
		}
		
		public function get TopicID():Number
		{
			return _TopicID;
		}
		
		public function get TopicName():String
		{
			return _TopicName;
		}
		
		public function get lastPostDate():Date
		{
			return _lastPostDate;
		}
		
		public function get unreadPosts():Number
		{
			return _unreadPosts;
		}
				

         public function set TopicName(newTopicName:String):void
		 {
			 this._TopicName = newTopicName;
		 }
		 
		 public function get TopicPosts():Array
		 {
			 return _TopicPosts;
		 }
		 
	}
	
}
